<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/salesHold.do"/>
<%@ page import="com.scalar.chiptrack.utils.ConfigManager,
                 com.scalar.chiptrack.commons.SessionKeys,
                 com.scalar.chiptrack.commons.Constants,
                 com.scalar.chiptrack.sales.LineItem,
                 java.util.ArrayList"%>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>
<% int bgcount = 0;%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>

<script src="<%=chipTracContext%>/jsp/includes/scripts/functions.js">
</script>
<SCRIPT language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></script>
<script  language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/quickSearch.js"></script>


<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0" onload='enableSelectedAll()'>

 <% User user1 = (User) session.getAttribute (SessionKeys.USER_KEY);
        boolean canModify = user1.isActionAllowed ( Functionality.SALES_HOLDS_RELEASES,
          User.USER_ACTION_MODIFY );
 %>

<SCRIPT language="JavaScript">

<% java.util.ArrayList checkCnt = null;
   int num = 0;
try
{
checkCnt = (java.util.ArrayList)request.getAttribute("lineItemList");
 num = checkCnt.size();
}
catch(Exception e){}
%>
var checkboxCnt = <%= num %>
var  errors = "" ;
    window.onload = init;
    function init()
    {

        qs_1 = new QuickSearch(document.salesHoldForm['customerPO'], document.salesHoldForm.qs1, false);
    }

    function GetAllProducts()
    {
        newWindow = window.open('loadProducts.do','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=500,height=600,resizable=no');
  	newWindow.moveTo(300,30);
  	newWindow.focus();
    }

    function assignProduct(passedValue)
    {
	document.salesHoldForm.productName.value = passedValue;
	window.focus();
    }

    function submitPage(action)
    {
        var count = document.salesHoldForm.bgCount.value;

        if(!isInteger(document.salesHoldForm.year.value)) {
            errors = "<li> Please enter a valid integer";
            var pa=document.getElementById("errors1");
            pa.innerHTML = errors;
            theForm.year.select();
            return false;
        }

        if( document.salesHoldForm.lineItemId != null )
        {
            if( document.salesHoldForm.lineItemId.length == null )
            {
                document.salesHoldForm.marketingHold.disabled = false;
                document.salesHoldForm.financeHold.disabled = false;
                document.salesHoldForm.operationsHold.disabled = false;
                document.salesHoldForm.salesHold.disabled = false;
            }
            else
            {
                for(var k=0; k < count; k++)
                {
                    document.salesHoldForm.marketingHold[k].disabled = false;
                    document.salesHoldForm.financeHold[k].disabled = false;
                    document.salesHoldForm.operationsHold[k].disabled = false;
                    document.salesHoldForm.salesHold[k].disabled = false;
                }
            }
        }

        if(action == 'LOADORDERS') {
            document.salesHoldForm.action.value = "loadSalesOrders";
             document.salesHoldForm.submit();
        } else if(action == 'LOADSALESHOLDS') {
            document.salesHoldForm.action.value = "loadHoldSalesOrders";
             document.salesHoldForm.submit();
        } else if(action == 'LOADRELEASES') {
            document.salesHoldForm.action.value = "loadReleaseSalesOrders";
             document.salesHoldForm.submit();
        } else if(action == 'HOLDSELECTED') {
            document.salesHoldForm.action.value = "holdSelectedOrders";
             document.salesHoldForm.submit();
        } else if(action == 'RELEASESELECTED') {
            document.salesHoldForm.action.value = "releaseSelectedOrders";
             document.salesHoldForm.submit();
        }

        else if(action == 'SAVESELECTED')
        {
            document.salesHoldForm.action.value = "saveSelectedOrders";

            //If there is only one item in the list
            if( document.salesHoldForm.lineItemId.length == null )
            {
                if( document.salesHoldForm["selected0"].checked == true)
                {
                    document.salesHoldForm.submit();
                }
                else
                {
                  var pa=document.getElementById("errors");
                  pa.innerHTML = "<li> Check one or more LineItems to save";

                  document.salesHoldForm.marketingHold.disabled = true;
                  document.salesHoldForm.financeHold.disabled = true;
                  document.salesHoldForm.operationsHold.disabled = true;
                  document.salesHoldForm.salesHold.disabled = true;
                  document.salesHoldForm.customerPO.focus();
                  return;
                }
            }

            var cntFlag =0;
            //This for loop will get the count of checked checkboxes
            for(var i=0; i < count; i++)
            {
                if(document.salesHoldForm["selected"+i].checked == true)
                {
                  cntFlag++;
                }
            }
            //If there is atleast one checked check box then the form is submitted
            if( cntFlag > 0 )
            {
              document.salesHoldForm.submit();
            }
            //If there no checkbox is selected
            else
            {
               //Modified by Rohan on August 6th 2003
                var pa=document.getElementById("errors");
                pa.innerHTML = "<li> Check one or more LineItems to save";

                for(var j=0; j < count; j++)
                {
                    document.salesHoldForm.marketingHold[j].disabled = true;
                    document.salesHoldForm.financeHold[j].disabled = true;
                    document.salesHoldForm.operationsHold[j].disabled = true;
                    document.salesHoldForm.salesHold[j].disabled = true;

                }
              document.salesHoldForm.customerPO.focus();
            }
        }
    }


// ** Added by Sharath on 30 June 03, changed completly by Kumar
function enableIfChecked(bgcount)
{

    var isMktgAllowed = <%= (user1.isActionAllowed ( Functionality.MARKETING_HOLDS_RELEASE,User.USER_ACTION_MODIFY ) ? false : true ) %>;
    var isFinanceAllowed = <%= (user1.isActionAllowed ( Functionality.FINANCE_HOLDS_RELEASE,User.USER_ACTION_MODIFY ) ? false : true ) %>;
    var isOpsAllowed = <%= (user1.isActionAllowed ( Functionality.OPERATIONS_HOLDS_RELEASE,User.USER_ACTION_MODIFY ) ? false : true ) %>;
    var isSalesAllowed = <%= (user1.isActionAllowed ( Functionality.SALES_HOLDS_RELEASE,User.USER_ACTION_MODIFY ) ? false : true )%> ;

    var checkBoxChecked = eval(document.salesHoldForm["selected"+bgcount]);

        if(document.salesHoldForm.lineItemId.length == null)
        {
            if( (checkBoxChecked != null) && (checkBoxChecked.checked == true) ) {
                document.salesHoldForm.marketingHold.disabled = isMktgAllowed;
                document.salesHoldForm.financeHold.disabled = isFinanceAllowed;
                document.salesHoldForm.operationsHold.disabled = isOpsAllowed;
                document.salesHoldForm.salesHold.disabled = isSalesAllowed;
             } else {
                document.salesHoldForm.marketingHold.disabled = true;
                document.salesHoldForm.financeHold.disabled = true;
                document.salesHoldForm.operationsHold.disabled = true;
                document.salesHoldForm.salesHold.disabled = true;
             }
        }
        else
        {

            if( (checkBoxChecked != null) && (checkBoxChecked.checked == true) ) {
                document.salesHoldForm.marketingHold[bgcount].disabled = isMktgAllowed;
                document.salesHoldForm.financeHold[bgcount].disabled = isFinanceAllowed;
                document.salesHoldForm.operationsHold[bgcount].disabled = isOpsAllowed;
                document.salesHoldForm.salesHold[bgcount].disabled = isSalesAllowed;
            } else {

                document.salesHoldForm.marketingHold[bgcount].disabled = true;
                document.salesHoldForm.financeHold[bgcount].disabled = true;
                document.salesHoldForm.operationsHold[bgcount].disabled = true;
                document.salesHoldForm.salesHold[bgcount].disabled = true;
            }
        }
}

 // SharatH on July 31, 2003
function showErrorReportPage()
{
    newWindow = window.open ('<%=chipTracContext%>/reportProblem.do','reportProblem','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=750,height=400,resizable=no');
    newWindow.focus();
}






    //Added by Rohan on August 6th 2003
    //These functions have been added to give the functionality of success.jsp to this page
    function openCustomer()
    {
	    newWindow = window.open('customers.do?action=PrintCustomer&customerId=<%=(String)request.getAttribute("customerId")%>','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=600,height=600,left=100,top=50,resizable=yes');
  	    //newWindow.moveTo(100,50);
  	    newWindow.focus();
    }
    function openSalesOrder()
    {
        var isSample = document.salesHoldForm.isSample.value;
        newWindow = window.open('order.do?action=printOrder&revisedDate=false&salesOrderId=<%=(String)request.getAttribute("salesOrderId")%>&isSample='+isSample,'optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=600,height=600,left=100,top=50,resizable=yes');
  	    //newWindow.moveTo(100,50);
  	    newWindow.focus();
    }
    //End of additions by Rohan on August 6th 2003

   //added by sujan on 18th nov 2004
   function enableSelectedAll ( )
   {
        var checkboxCount = document.salesHoldForm.bgCount.value;
        for ( i=0; i < checkboxCount; i++ )
        {
            enableIfChecked ( i );
        }
   }
   //End of additions by sujan
</SCRIPT>



<!-- Top Header Start-->

<%@ include file="/jsp/includes/header.jsp" %>

<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->

<%
 String heading = "";
 String isSample = "1";
%>
<%
 if((request.getParameter("isSample") != null) && (request.getParameter("isSample").equals("0"))) {
         heading = "Sample Order"; isSample="0";
%>
	<%@ include file="/jsp/sales/sample_order_menu.jsp" %>
<% } else {
     heading = "Sales Order";isSample="1";
%>
        <%@ include file="/jsp/sales/sales_order_menu.jsp" %>
<% } %>

<!-- end of the side navigations -->


</TD>

<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<!-- from here your body starts -->


<center><span class="NArialW"><%=heading%> Holds/Release</span></center>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10>
<html:form name="salesHoldForm" onsubmit="return submitPage('LOADORDERS');" method="post" action="/salesHold" type="com.scalar.chiptrack.sales.forms.SalesHoldForm">
 <table border="0" width="90%" align=right>
<!--Added by Rohan on August 6th 2003
These tags have been added to give the functionality of success.jsp to this page -->
 <tr><td>
    <chiptrack:info styleClass="NArialL" />
    <chiptrack:errors styleClass="NArialL" />
    <chiptrack:messages type="info" styleClass="NArialL" />
 </td></tr>
 <br>
<!--End of additions by Rohan on August 6th 2003-->

 <tr><td>
 <table border="0" width="100%" align=right>

    <!-- Commented by Rohan on August 6th 2003 as there is another error tag existing at the begining of the page
    <tr><td colspan=7 class="NArialL"><chiptrack:errors styleClass="NArialL" /><br></td></tr> -->

    <!--Bhaskar added this link on 15 july 2003-->
    <% if (( !canModify ) && (request.getAttribute("showList").equals ("TRUE"))) { %>
        <tr><td colspan=7 align='left'>
        <font class='NArialS'>
        <font color='blue'><b><%=Constants.NO_MODIFY_RIGHTS %></b>
        </font></td></tr>

    <% } %>
    <tr><td colspan='6' align="left" class='NArialL'><FONT id="errors1" color='FF0000'></FONT></TD></TR>
    <tr><td colspan='6' align="left" class='NArialL'>&nbsp;</TD></TR>

    <tr>
	  <!-- Modified by veeru on (03/05/04)
      <td width="25%"><font class="NArialL">Product Name<br>(Mfg Part Number)</font></td> -->
	  <td width="25%"><font class="NArialL">Product Name<br>(<bean:message key="label.mfgPartNumber" />)</font></td>
      <td width="15%"><font class="NArialL" colspan=4>
           <html:select name="salesHoldForm" property="productName" styleClass="txfield">
                <html:options collection="productList" property="value" labelProperty="label"/>
           </html:select>
      </td>
      <td width="10%">&nbsp;</td>
      <td width="15%" ><font class="NArialL">Customer</font></td>
      <td width="15%"><font class="NArialL">
        <html:select name="salesHoldForm"  property="customerId" styleClass="txfield">
            <html:options collection="customersList" property="value" labelProperty="label"/>
        </html:select>
      </td>
    </tr>
    <tr>
      <td width="25%"><font class="NArialL">Quick Search Sales Order #</font></td>
      <td width="15%">
        <input type="text" name="qs1" class="txfield" size='20' onkeyup='quickSearch(qs_1);'/>
      </td>
      <td width="10%">&nbsp;</td>
      <td width="15%"><font class="NArialL">&nbsp;</font></td>
      <td width="15%">
            &nbsp;
      </td>
    </tr>
    <tr>
      <td width="25%"><font class="NArialL">Sales Order #</font></td>
      <td width="15%"><font class="NArialL">
              <html:select name="salesHoldForm" property="customerPO" styleClass="txfield">
            <html:options collection="salesOrdersList" property="value" labelProperty="label"/>
        </html:select>
              <%--<html:text name="salesHoldForm"  property="customerPO" size="20" styleClass="txfield" />--%>
      </td>
      <td width="10%">&nbsp;</td>
      <td width="15%"><font class="NArialL">Year</font></td>
      <td width="15%"><font class="NArialL">
       <%-- <html:text name="salesHoldForm" property="year" size="5" maxlength="4" styleClass="txfield" /> --%>
       <html:select name="salesHoldForm" property="year" styleClass="txfield">
        <html:option value="">--All--</html:option>
        <html:options collection="years" property="value" labelProperty="label" />
       </html:select>
      </td>
       </tr>
    <tr><td colsapn=6><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>

    <tr>
      <td colspan=6 align=center class="NArialL">
        <a href="javascript:submitPage('LOADORDERS');" onmouseover="window.status='Click to Search for Sales Orders List';return true" onmouseout="window.status='';return true"title="Click here to Search for Sales Orders List">
        <input type=image src="<%=chipTracContext%>/jsp/includes/images/search.gif" border=0></a>

        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

        <a href="javascript:document.salesHoldForm.reset();"><img src="<%=chipTracContext%>/jsp/includes/images/reset.gif" border='0' onmouseover="window.status='Click to Reset';return true" onmouseout="window.status='';return true"title="Click here to Reset"></a>



        <!--
        <a href="javascript:window.history.back();"><img src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" border=0></a>
        -->
      </td>
    </tr>

   </table>
   </td></tr>
   <tr><td colspan=7 align="left" class='NArialL'><font styleClass="NArialL" id='errors' color="FF0000"  />&nbsp;</font></td></tr>
   <tr><td colspan=7 class="NArialL"></td></tr>
   <tr><td><img height=10 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td></tr>
   <logic:equal name="showList" value="TRUE">

   <%
       if(num > 0)
   {
   %>
   <tr><td colspan=7 align='left'><font class='NArialS'><font color='blue'>[Click on Select checkbox to edit Holds]</font></td></tr>
   <%
   }
   %>
   <tr><td>



   <table border="0" width="100%" bordercolor="#FFFFFF" align=right>
    <!--Bhaskar added this scriptlet on 15 july 2003>
       < % if ( request.getAttribute("showMessage").toString().equalsIgnoreCase("TRUE") ) { %>
         <tr><td colspan=7 align='left'>
            <font class='NArialS'>
            <font color='blue'>[You do not have rights to modify this page]
         </font></td></tr>
       < % } %-->
        <tr>
          <td width="5%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Select</font></td>
          <td width="20%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF"><bean:message key="label.mfgPartNumber" /></font></td>
         <td width="20%" align="center" bgcolor="#993333"><font class="NArialL">
		 <font color="#FFFFFF">
				 <!-- Modified by veeru on (03/08/04)
				Customer PartNo -->
				<bean:message key="label.customerPartNumber"/>
		 </font></td>
	  <td width="20%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Sales Order #</font></font></td>
	  <td width="5%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">LineItem No</font></font></td>
      <td width="5%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Booking Date</font></font></td>
      <td width="5%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Request Date</font></font></td>
      <td width="5%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Schedule Date</font></font></td>
      <td width="10%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Quantity</font></font></td>
      <td width="10%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Pay Terms</font></font></td>
          <td width="20%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Customer Name</font></font></td>
	  <td width="20%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">
            <table with="100%" border=0>
                <tr><td colspan=4 class="NArialL" align=center><font color="#FFFFFF">Holds</td></tr>
                <font size="-3"><tR><td width="25%" align=left class="NArialL"><font color="#FFFFFF">Mktg</font></td><td  width="25%" align=center class="NArialL"><font color="#FFFFFF">Fin</font></td><td width="25%" align=right class="NArialL"><font color="#FFFFFF">Ops</FONT></td><td  align=right width="25%" class="NArialL"><font color="#FFFFFF">&nbsp;&nbsp;&nbsp;Sales</FONT></td></tr></font>
            </table>
          </font></font></td>
	</tr>
        <!--Bhaskar added this scriptlet on 9 July 2003-->
        <% ArrayList orderList = ( ArrayList ) request.getAttribute( "lineItemList" ); %>
	<logic:iterate id="LineItem" name="lineItemList">
        <% bgcount = bgcount + 1; %>
	<tr>
          <td width="5%" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                <input type="checkbox" name="selected<%=bgcount-1%>" value="ON" onClick="javascript:enableIfChecked(<%=bgcount-1%>)"/>
                <font class="NArialL"><html:hidden name="LineItem" property="lineItemId" /></font>
          </td>

          <td width="20%" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                <font class="NArialL"><bean:write name="LineItem" property="manufacturingPartNo" /></font>
          </td>
          <td width="20%" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                <font class="NArialL"><bean:write name="LineItem" property="customerPartNo" /></font>
          </td>

	  <td width="20%" class="NArialL" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
          <!--Bhaskar added this scriptlet on 9 July 2003-->
                <%
                    LineItem orders = ( LineItem ) orderList.get( bgcount -1 );
                    int salesOrderId = orders.getSalesOrderId();
                %>
                <!--A HREF='<%=chipTracContext%>/approveOrder.do?salesOrderId=<bean:write name="LineItem" property="salesOrderId"/>'-->

                <!-- Modified by Basha (08/09/2003) anchor link changed from approverOrder.do to order.do -->
                <chiptrack:restrictedLink functionality='<%=Functionality.SALES_PENDING_ORDER%>' action='<%=User.USER_ACTION_VIEW%>' styleClass="leftsection" href='<%=chipTracContext + "/order.do?salesOrderId=" + salesOrderId + "&isSample="+request.getParameter("isSample")%>' onmouseover="window.status='Click to View this Sales Order';return true" onmouseout="window.status='';return true">
                <bean:write name="LineItem" property="salesOrderNo"/>
                <html:hidden name="LineItem" property="salesOrderId" />
                </chiptrack:restrictedLink>

                <!-- Added by Prabhanjan on 2nd Mar 2004 to post schedule date -->
                <html:hidden name="LineItem" property="scheduleDate" />

          </td>
	  <td width="5%" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                <font class="NArialL"><bean:write name="LineItem" property="lineItemNo"/></font>
      </td>

	  <td width="5%" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                <font class="NArialL"><bean:write name="LineItem" property="bookingDate"/></font>
      </td>
      <td width="5%" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                <font class="NArialL"><bean:write name="LineItem" property="requestDate"/></font>
      </td>
      <td width="5%" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                <font class="NArialL">
                    <logic:notEmpty name="LineItem" property="revisedDate">
                        <bean:write name="LineItem" property="revisedDate"/>
                    </logic:notEmpty>
                    <logic:empty name="LineItem" property="revisedDate">
                        <bean:write name="LineItem" property="scheduleDate"/>
                    </logic:empty>
                </font>
      </td>
      <td width="10%" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                <font class="NArialL"><bean:write name="LineItem" property="qtyAsString"/></font>
          </td>
      <td width="10%" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
               <font class="NArialL"><bean:write name="LineItem" property="shippingTerms"/></font>
      </td>
	  <td width="20%" align="left" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                <font class="NArialL"><bean:write name="LineItem" property="customerName"/></font>
          </td>
	  <td width="20%" align="center" <%if(bgcount%2==0){%> bgcolor='#DEE1E2' <% } else {%> bgcolor='#FFFFEE' <%}%>>
                <font class="NArialL">
                          <table with="100%">
                <tr>
                    <td class="NArialL">
                        <html:select name="LineItem" property="marketingHold" styleClass="txfield" disabled="true">
                            <html:option value=""></html:option>
                            <html:option value="0">X</html:option>
                            <html:options collection="marketingReasonCodes" property="value" labelProperty="label"/>&nbsp;
                        </html:select>
                    </td>
                    <td class="NArialL">
                            <html:select name="LineItem" property="financeHold" styleClass="txfield" disabled="true">
                                <html:option value=""></html:option>
                                <html:option value="0">X</html:option>
                                <html:options collection="financeReasonCodes" property="value" labelProperty="label"/>&nbsp;
                            </html:select>
                    </td>
                    <td class="NArialL">
                        <html:select name="LineItem" property="operationsHold" styleClass="txfield" disabled="true">
                            <html:option value=""></html:option>
                            <html:option value="0">X</html:option>
                            <html:options collection="opsReasonCodes" property="value" labelProperty="label"/>&nbsp;
                        </html:select>
                    </td>
                    <td class="NArialL">
                        <html:select name="LineItem" property="salesHold" styleClass="txfield" disabled="true">
                            <html:option value=""></html:option>
                            <html:option value="0">X</html:option>
                            <html:options collection="salesReasonCodes" property="value" labelProperty="label" />&nbsp;
                        </html:select>
                    </td>
                </tr>
            </table>
           </font></font>
          </td>
	</tr>

        </logic:iterate>

        <tr><td colspan="7"><img height=10 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td></tr>
        <tr><td colspan="7">
        <%
         if(num > 0)
         {
       %>
            <!-- commented by Bhaskar on 9 July 2003-->
            <!--chiptrack:restrictedLink functionality='< %=Functionality.SALES_HOLD_RELEASE_SETUP%>' action='<%=User.USER_ACTION_MODIFY%>' href="javascript:submitPage('SAVESELECTED');" onmouseover="window.status='Click here to approve sales order';return true" onmouseout="window.status='';return true">
            <img src="<%//=chipTracContext%>/jsp/includes/images/save.gif" border=0><///chiptrack:restrictedLink-->
            <chiptrack:restrictedLink functionality='<%=Functionality.SALES_HOLDS_RELEASES%>' action='<%=User.USER_ACTION_MODIFY%>' href="javascript:submitPage('SAVESELECTED');" onmouseover="window.status='Click to approve the modifications of holds for a sales order';return true" onmouseout="window.status='';return true">
            <img src="<%=chipTracContext%>/jsp/includes/images/save.gif" border=0 title="Click here to approve the modifications of holds for a sales order"></chiptrack:restrictedLink>
       <%
         }
       %>
            <!--<chiptrack:restrictedLink functionality='<%=Functionality.SALES_HOLDS_RELEASE%>' action='<%=User.USER_ACTION_MODIFY%>' href="javascript:submitPage('RELEASESELECTED');" onmouseover="window.status='Click here to approve the modifications of holds for a Sales Order" onmouseout="window.status='';return true">
            <img src="<%=chipTracContext%>/jsp/includes/images/releaseselected.gif" border=0></chiptrack:restrictedLink>-->

            <!--
            <a href="javascript:window.history.back();"><img src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" border=0></a>
            -->

        </td></tr>
    </table>
    </logic:equal>
    </td></tr>
</table>

<input type="hidden" name="action" value="">
<input type="hidden" name="bgCount" value="<%=bgcount%>">
<input type="hidden" name="isSample" value="<%=request.getParameter("isSample")%>">
</html:form>

<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>
<!-- Footer starts here -->

<%@ include file="/jsp/includes/footer.jsp" %>

<!-- footer end here -->

</BODY>
</HTML>
